/*
 * ArcEmu MMORPG Server
 * Copyright (C) 2008-2010 <http://www.ArcEmu.org/>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

#ifndef AUTHSOCKET_H
#define AUTHSOCKET_H


class LogonCommServerSocket;
struct Patch;
class PatchJob;
class DataPacket;

class AuthSocket : public Socket
{
	friend class LogonCommServerSocket;
public:
	AuthSocket(SOCKET fd);
	~AuthSocket();

	void OnRead();

	///////////////////////////////////////////////////
	// Client Packet Handlers
	//////////////////////////

	void HandeleCamera(DataPacket& pack);

	///////////////////////////////////////////////////
	// Server Packet Senders
	//////////////////////////
	void SendMove(uint32 dir, uint32 speed);

	
	ARCEMU_INLINE void SendPacket(const uint8* data, const uint16 len) { Send(data, len); }
	void OnDisconnect();
	ARCEMU_INLINE time_t GetLastRecv() { return last_recv; }


	bool removedFromSet;
protected:

	bool m_authenticated;
	time_t last_recv;
	uint32		m_nRemaining;
	uint32		m_Opcode;
	uint32		m_nSize;
};

#endif
